tricky coding questions on palindrome